﻿@model IEnumerable<News.CYT369.Com.Domains.Document>
@{
    var actionName = (this.ViewContext.ActionDescriptor as Microsoft.AspNetCore.Mvc.Controllers.ControllerActionDescriptor).ActionName;
    int pageNumber = (int)ViewBag.page;
    int totalPage = (int)ViewBag.total_page;

}
@section styles{
    <link href="~/css/articles-index.css" rel="stylesheet" />
}
@section scripts{
    <script src="~/js/article-index.js"></script>
}
<div class="panel articles-index">
    <div class="articles-content">
        <ul class="articles-list">
            <partial name="_PartialIndex" model="Model" />
        </ul>
        @if (Model != null && Model.Count() > 0 && pageNumber < totalPage)
        {
            var url = $"~/Articles/{actionName}/{Base64.ObjectToBase64(new { ContentTypeID = ViewBag.ContentTypeID, DocTypeID = ViewBag.DocTypeID, Page = pageNumber + 1 })}.chtml";
            <div class="more-articles" onclick="LoadNextDoc(this)">
                <a style="display:none" href="@Url.Content(url)">下一页</a>
                <span>加载更多...</span>
            </div>
        }
    </div>
    <div class="article-index-ext">
        <partial name="_HotArticles" />
    </div>
</div>
